# -*- coding: utf-8 -*-
from fabric.api import *
from Common.com_func import mkdir
from Env import env_config_docker as cfg
import time

"""
    【 引 入 Layui 框 架 】
    问题：layui 中的层级 与 原有层级不一致
    方案：先编译原有前端文件，然后再将'static'中的'layui'拷贝到'Build'对应目录中
    Api/static/layui/css/*    -> Build/css/*
    Api/static/layui/font/*   -> Build/font/*
    Api/static/layui/layui.js -> Build/layui.js
"""


# 设置变量
pro_path = "/Users/micllo/Documents/works/Gitee/pythonApi"
static_layui_path = pro_path + "/Api/static/layui"
build_path = pro_path + "/Build"

# 本地操作
def copy_layui():
    with lcd(static_layui_path):
        local(f"cp -r css/* {build_path}/css")
        local(f"cp -r font/* {build_path}/font")
        local(f"cp -r layui.js {build_path}/js")


if __name__ == "__main__":
    copy_layui()



